home *** CD-ROM | disk | FTP | other *** search
/ Ultra Gameplayers 101 / Ultra Game Players Magazine, No. 101 - September 1997 (Imagine Publishing, Inc.)(1997).iso / pc / new_ugp.dxr / 00243.ls < prev    next >
Encoding:
Text File  |  1997-07-10  |  1.1 KB  |  30 lines

  1. on InitDatabases
  2.   global titleDatabase
  3.   put "Initializing Databases"
  4.   if not objectp(titleDatabase) then
  5.     set sourceList to ["platforms filedata", "bootcamp filedata", "coverstory filedata", "crypt filedata", "online filedata", "credits filedata", "codebook filedata 1", "codebook filedata 2", "codebook filedata 3", "codebook filedata 4"]
  6.     set titleDatabase to new(script "databaseClass", sourceList)
  7.   end if
  8.   put "title initialized"
  9. end
  10.  
  11. on CheckTitleDB
  12.   global titleDatabase
  13.   if objectp(titleDatabase) then
  14.     set sectTree to the sectiontree of titleDatabase
  15.     repeat with sectIndex = 1 to count(sectTree)
  16.       set sectName to getPropAt(sectTree, sectIndex)
  17.       set categorytree to getAt(sectTree, sectIndex)
  18.       repeat with catIndex = 1 to count(categorytree)
  19.         set catName to getPropAt(categorytree, catIndex)
  20.         set recordTree to getAt(categorytree, catIndex)
  21.         repeat with record in recordTree
  22.           put sectName & ":" & catName & ":" & the name of record
  23.         end repeat
  24.       end repeat
  25.     end repeat
  26.   else
  27.     put "titleDatabase not initialized"
  28.   end if
  29. end
  30.